package com.novel.frame.wxl;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
import javax.swing.border.TitledBorder;

import com.novel.frame.lxf.Register_Jpanel;



public class SearchFrame extends JFrame{
	//================上部面板=======================
	private static final long serialVersionUID = 1L;
	private JScrollPane js_MainScreen;// 主滚动面板
	private JPanel jp_MainScreen;// 主面板
	private JPanel jp_SearchFrameSouth;//南部
	private JPanel jp_SearchFrameNorth;//北部
	private JPanel jp_SearchFrameNorth_nor;//北部===北面
	private JLabel jl_SearchFrameNor_register;//注册
	private JLabel jl_SearchFrameNor_logOn;//登录
	private JLabel jl_SearchFrameNor_helpOne;//帮助
	private JLabel jl_SearchFrameNor_Client;//客户端
	private JLabel jl_SearchFrameNor_Collection;//收藏
	private JLabel jl_SearchFrameNor_homePage;//首页
	private JLabel jl_SearchFrameNor_helpTwo;//帮助
	
	private JPanel jp_SearchFrameNorth_cer;//北部===中间
	private JLabel jl_SearchFrameCer_logn;//logn标签
	private JLabel jl_SearchFrameCer_Romance;//转言情网标签
	private JLabel jl_SearchFrameCer_literature;//转文学网标签
	private JLabel jl_SearchFrameCer_Comic;//转动漫网标签
    private JLabel jl_SearchFrameCer_Recommendnovel;//推荐小说标签
    private JLabel jl_SearchFrameCer_SearchFramedisplay;//推荐小说标签

	private JPanel jp_SearchFrameNorth_sth;//北部===南面	
	private JPanel jp_SearchFrameSth_menu;//菜单面板
	private JButton jb_SearchFrameSth_homePage;//首页
	private JButton jb_SearchFrameSth_girlChannel;//女生频道
	private JButton jb_SearchFrameSth_RankList;//排行版
	private JButton jb_SearchFrameSth_query;//查询小说
	private JButton jb_SearchFrameSth_authorWelfare;//作者福利
	private JButton jb_SearchFrameSth_authorArea;//作者专区
	private JButton jb_SearchFrameSth_SearchFrame;//资讯
	private JButton jb_SearchFrameSth_Client;//客户端
	private JButton jb_SearchFrameSth_Recharge;//充值
	private JButton jb_SearchFrameSth_CustomerService;//客服
	private JLabel  jl_SearchFrameSth_StackRoom;//书库标签
	private JLabel  jl_SearchFrameSth_urbanAndRomance;//都市-言情
	private JLabel  jl_SearchFrameSth_fantasy;//玄幻-修真
	private JLabel  jl_SearchFrameSth_history;//历史-武侠
	private JLabel  jl_SearchFrameSth_sports;//网游-竞技
	private JLabel  jl_SearchFrameSth_military;//军事-科幻
	private JLabel  jl_SearchFrameSth_terror;//恐怖-同人
	private JLabel  jl_SearchFrameSth_newBook;//全本-新书
	
	private JPanel jp_SearchFrameCenter;//中部
	
	private JTextField jt_SearchFrameCenter_search;//搜索框
	private JButton jb_SearchFrameCenter_search;//搜索按钮
	private JLabel lb_SearchResult;//搜索结果
	private JLabel lb_book1_img;//书本1图片
	private JLabel lb_book1_name;//书本1名字
	private JLabel lb_book2_img;//书本1图片
	private JLabel lb_book2_reader;//阅读图片
	private JLabel lb_book2_Collection;//图片2收藏图片
	
	private JLabel lb_book3_img;//书本1图片
	private JLabel lb_book3_reader;//阅读图片
	private JLabel lb_book3_Collection;//图片2收藏图片
	
	private JLabel lb_book4_img;//书本1图片
	private JLabel lb_book4_reader;//阅读图片
	private JLabel lb_book4_Collection;//图片2收藏图片
	
	private JLabel lb_book5_img;//书本1图片
	private JLabel lb_book5_reader;//阅读图片
	private JLabel lb_book5_Collection;//图片2收藏图片
	
	private JLabel lb_Collection;//收藏标签
	private JLabel lb_reader;//阅读标签
	
	private JButton jb_previousPage;//上一页
	private JButton jb_button1;//按钮1
	private JButton jb_button2;//按钮2
	private JButton jb_nextPage;//下一页
	private JLabel lb_pagenum;//页数
    
	
	
	Cursor cursor=new Cursor(Cursor.HAND_CURSOR);//小手
	
	//==================中部面板=====================
	public SearchFrame() {
		Dimension d = getToolkit().getScreenSize();
        setLayout(null);
		//主滚动面板
        js_MainScreen = new JScrollPane();
		js_MainScreen.setBounds(0, 0, d.width, d.height);
		//设置滚动条滑动速度
		js_MainScreen.getVerticalScrollBar().setUnitIncrement(30);
		add(js_MainScreen);
	    // 创建主面板
		jp_MainScreen = new JPanel();
		jp_MainScreen.setPreferredSize(new Dimension(d.width, (int)(1.5*d.height)));
		jp_MainScreen.setBackground(Color.WHITE);
		jp_MainScreen.setLayout(new BorderLayout());
		js_MainScreen.getViewport().add(jp_MainScreen);
		//北部面板
		jp_SearchFrameNorth=new JPanel();
		jp_SearchFrameNorth.setPreferredSize(new Dimension(0, (int)(d.height*0.28)));
		jp_SearchFrameNorth.setLayout(new BorderLayout());
		jp_MainScreen.add(jp_SearchFrameNorth, BorderLayout.NORTH);
        //北部=的北面
		jp_SearchFrameNorth_nor=new JPanel();
		jp_SearchFrameNorth_nor.setBackground(new Color(210, 210, 210));
		jp_SearchFrameNorth_nor.setPreferredSize(new Dimension(0,(int)((d.height*0.28)*0.16)));
		jp_SearchFrameNorth_nor.setLayout(null);
		jp_SearchFrameNorth.add(jp_SearchFrameNorth_nor, BorderLayout.NORTH);
//		SearchFrameNorth_nor(d);//北部面板标签===方法		
		//北部===的中间
		jp_SearchFrameNorth_cer=new JPanel();
		jp_SearchFrameNorth_cer.setBackground(new Color(245, 245, 245));
		jp_SearchFrameNorth_cer.setPreferredSize(new Dimension(0,(int)((d.height*0.28)*0.54)));
		jp_SearchFrameNorth_cer.setLayout(null);
		jp_SearchFrameNorth.add(jp_SearchFrameNorth_cer, BorderLayout.CENTER);
		SearchFrameNorth_cer(d);
		//北部===的南
		jp_SearchFrameNorth_sth=new JPanel();
		jp_SearchFrameNorth_sth.setBackground(new Color(0,160,178));
		jp_SearchFrameNorth_sth.setPreferredSize(new Dimension(0,(int)((d.height*0.28)*0.30)));
		jp_SearchFrameNorth_sth.setLayout(null);
		jp_SearchFrameNorth.add(jp_SearchFrameNorth_sth, BorderLayout.SOUTH);
		SearchFrameNorth_sth(d);	
        
		//==============================中部面板===============================
		//中部面板
		jp_SearchFrameCenter = new JPanel();
		jp_SearchFrameCenter.setLayout(null);
		jp_SearchFrameCenter.setPreferredSize(new Dimension(0, 800));
		jp_SearchFrameCenter.setBorder(new TitledBorder(""));
		jp_MainScreen.add(BorderLayout.CENTER,jp_SearchFrameCenter);
		
		Font f=new Font("微软雅黑", Font.PLAIN, 15);	
		
		//中部面板搜索框
		jt_SearchFrameCenter_search=new JTextField();
		jt_SearchFrameCenter_search.setBounds((int)(d.width*0.45),(int)(d.height*0.02),(int)(d.width*0.2), 30);
		jt_SearchFrameCenter_search.setFont(f);
		jp_SearchFrameCenter.add(jt_SearchFrameCenter_search);
    	//搜索按钮
		jb_SearchFrameCenter_search=new JButton("搜  索");
		jb_SearchFrameCenter_search.setBounds((int)(d.width*0.68),(int)(d.height*0.02),(int)(d.width*0.06),30);
		jb_SearchFrameCenter_search.setBackground(new Color(0,160,178));
		jb_SearchFrameCenter_search.setForeground(Color.WHITE);
		jb_SearchFrameCenter_search.setFocusable(false);
		jb_SearchFrameCenter_search.setFont(f);
		jp_SearchFrameCenter.add(jb_SearchFrameCenter_search);
		
		lb_SearchResult = new JLabel();
		lb_SearchResult.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/搜索结果图片.png")));
		lb_SearchResult.setBounds((int)(d.width*0.12),(int)(d.height*0.09),(int)(d.width*0.8),80);
		jp_SearchFrameCenter.add(lb_SearchResult);
		
		//书本1图片
		lb_book1_img = new JLabel();
		lb_book1_img.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/书本2图片.png")));
		lb_book1_img.setBounds(350, 150, 1250, 300);
		jp_SearchFrameCenter.add(lb_book1_img);
		
		
		//收藏标签
		lb_Collection = new JLabel();
		lb_Collection.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/收藏图片.png")));
		lb_Collection.setBounds(1100, 200, 100, 80);
		jp_SearchFrameCenter.add(lb_Collection);
		
		//阅读标签
		lb_reader = new JLabel();
		lb_reader.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/阅读图片.png")));
		lb_reader.setBounds(1200, 200, 100, 80);
		jp_SearchFrameCenter.add(lb_reader);
		
//		//书本2图片
//		lb_book2_img = new JLabel();
//		lb_book2_img.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/书本2图片.png")));
//		lb_book2_img.setBounds(350, 400, 1200, 200);
//		jp_SearchFrameCenter.add(lb_book2_img);
//		
//		//收藏标签
//		lb_book2_Collection = new JLabel();
//		lb_book2_Collection.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/收藏图片.png")));
//		lb_book2_Collection.setBounds(1100, 400, 100, 80);
//		jp_SearchFrameCenter.add(lb_book2_Collection);
//		
//		//阅读标签
//		lb_book2_reader = new JLabel();
//		lb_book2_reader.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/阅读图片.png")));
//		lb_book2_reader.setBounds(1200, 400, 100, 80);
//		jp_SearchFrameCenter.add(lb_book2_reader);
//		
//		//书本2图片
//		lb_book3_img = new JLabel();
//		lb_book3_img.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/书本2图片.png")));
//		lb_book3_img.setBounds(350, 600, 1200, 200);
//		jp_SearchFrameCenter.add(lb_book3_img);
//		
//		//收藏标签
//		lb_book3_Collection = new JLabel();
//		lb_book3_Collection.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/收藏图片.png")));
//		lb_book3_Collection.setBounds(1100, 600, 100, 80);
//		jp_SearchFrameCenter.add(lb_book3_Collection);
//		
//		//阅读标签
//		lb_book3_reader = new JLabel();
//		lb_book3_reader.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/阅读图片.png")));
//		lb_book3_reader.setBounds(1200, 600, 100, 80);
//		jp_SearchFrameCenter.add(lb_book3_reader);
//		
//		//书本2图片
//		lb_book4_img = new JLabel();
//		lb_book4_img.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/书本2图片.png")));
//		lb_book4_img.setBounds(350, 800, 1200, 200);
//		jp_SearchFrameCenter.add(lb_book4_img);
		
//		//收藏标签
//		lb_book4_Collection = new JLabel();
//		lb_book4_Collection.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/收藏图片.png")));
//		lb_book4_Collection.setBounds(1100, 800, 100, 80);
//		jp_SearchFrameCenter.add(lb_book4_Collection);
//		
//		//阅读标签
//		lb_book4_reader = new JLabel();
//		lb_book4_reader.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/阅读图片.png")));
//		lb_book4_reader.setBounds(1200, 800, 100, 80);
//		jp_SearchFrameCenter.add(lb_book4_reader);
//		
//		//书本2图片
//		lb_book5_img = new JLabel();
//		lb_book5_img.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/书本2图片.png")));
//		lb_book5_img.setBounds(350, 800, 1200, 200);
//		jp_SearchFrameCenter.add(lb_book5_img);
//		
//		//收藏标签
//		lb_book5_Collection = new JLabel();
//		lb_book5_Collection.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/收藏图片.png")));
//		lb_book5_Collection.setBounds(1100, 800, 100, 80);
//		jp_SearchFrameCenter.add(lb_book5_Collection);
//		
//		//阅读标签
//		lb_book5_reader = new JLabel();
//		lb_book5_reader.setIcon(new ImageIcon(SearchFrame.class.getResource("./img/阅读图片.png")));
//		lb_book5_reader.setBounds(1200, 800, 100, 80);
//		jp_SearchFrameCenter.add(lb_book5_reader);
//		
		jb_previousPage = new JButton("1");
		jb_previousPage.setBackground(Color.green);
		jb_previousPage.setBounds(900, 1000, 50, 40);
		jp_SearchFrameCenter.add(jb_previousPage);
		jb_previousPage.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				lb_pagenum.setText("1/2页");
				jp_MainScreen.repaint();
				jp_MainScreen.updateUI();
			}
		});
		
		jb_previousPage = new JButton("2");
		jb_previousPage.setBackground(Color.green);
		jb_previousPage.setBounds(990, 1000, 50, 40);
		jp_SearchFrameCenter.add(jb_previousPage);
		jb_previousPage.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				lb_pagenum.setText("2/2页");
				jp_MainScreen.repaint();
				jp_MainScreen.updateUI();
			}
		});
		
		
		
		
		lb_pagenum = new JLabel("1/2页");
		lb_pagenum.setBounds(1180, 1000, 80, 40);
		lb_pagenum.setFont(f);
		jp_SearchFrameCenter.add(lb_pagenum);
		
		
		jb_nextPage = new JButton("下一页");
		jb_nextPage.setBounds(1080, 1000, 80, 40);
		jb_nextPage.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				if (lb_pagenum.getText() =="1/2页") {
					lb_pagenum.setText("2/2页");
				}
				
				jp_MainScreen.repaint();
				jp_MainScreen.updateUI();
			}
		});
		
		jp_SearchFrameCenter.add(jb_nextPage);
		//========================================================================
		//南部
		ImageIcon im_SearchFrameSonth=new ImageIcon(SearchFrame.class.getResource("./img/公告底部.png"));
		jp_SearchFrameSouth=new JPanel() {
			private static final long serialVersionUID = 1L;
			@Override
			public void paint(Graphics g) {
                  Image i=im_SearchFrameSonth.getImage();
                  g.drawImage(i, 0,0,this);
			}
		};
		jp_SearchFrameSouth.setPreferredSize(new Dimension(0, 400));
		jp_SearchFrameSouth.setBorder(new TitledBorder(""));
		jp_SearchFrameSouth.setPreferredSize(new Dimension(im_SearchFrameSonth.getIconWidth(),
				im_SearchFrameSonth.getIconHeight()));
		jp_MainScreen.add(jp_SearchFrameSouth, BorderLayout.SOUTH);
		
        setTitle("公告资讯");
		setSize(d);
		setLocationRelativeTo(null);
		setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		setVisible(true);	
	}
	

	//北部===北面(绝对布局)
	public void SearchFrameNorth_nor(Dimension d) {
	 Font font=new Font("微软雅黑", Font.PLAIN, 12);//字体格式
	 int SearchFrameNorHight=(int)(((d.height*0.25)*0.16)*0.05);//在面板标签==高度
	  //注册标签
	  jl_SearchFrameNor_register=new JLabel("注册");
	  jl_SearchFrameNor_register.setBounds((int)(d.width*0.12),SearchFrameNorHight,40, 30);
	  jl_SearchFrameNor_register.setFont(font);
	  jl_SearchFrameNor_register.setCursor(cursor);
//	  jl_SearchFrameNor_register.setForeground(Color.);
	  jp_SearchFrameNorth_nor.add(jl_SearchFrameNor_register);
	  //分割==1
	  JLabel jl_DivisionOne=new JLabel("|");
	  jl_DivisionOne.setBounds((int)(d.width*0.12)+40,-5,20,40);
	  jp_SearchFrameNorth_nor.add(jl_DivisionOne);
	  //登录标签
	  jl_SearchFrameNor_logOn=new JLabel("登录");
	  jl_SearchFrameNor_logOn.setBounds((int)(d.width*0.12)+40+20,SearchFrameNorHight,40, 30);
	  jl_SearchFrameNor_logOn.setFont(font);
	  jl_SearchFrameNor_logOn.setCursor(cursor);
	  jp_SearchFrameNorth_nor.add(jl_SearchFrameNor_logOn);
	  //分割==2
	  JLabel jl_DivisionTwo=new JLabel("|");
	  jl_DivisionTwo.setBounds((int)(d.width*0.12)+40+20+40,-5,20,40);
	  jp_SearchFrameNorth_nor.add(jl_DivisionTwo);
	  //帮助==1
	  jl_SearchFrameNor_helpOne=new JLabel("帮助");
	  jl_SearchFrameNor_helpOne.setBounds((int)(d.width*0.12)+40+20+40+20,SearchFrameNorHight,40, 30);
	  jl_SearchFrameNor_helpOne.setFont(font);
	  jl_SearchFrameNor_helpOne.setCursor(cursor);
	  jp_SearchFrameNorth_nor.add(jl_SearchFrameNor_helpOne);
	  //分割==3
	  JLabel jl_DivisionThree=new JLabel("|");
	  jl_DivisionThree.setBounds((int)(d.width*0.12)+40+20+40+20+40,-5,20,40);
	  jp_SearchFrameNorth_nor.add(jl_DivisionThree);
	  //客户端
	  jl_SearchFrameNor_Client=new JLabel("客户端");
	  jl_SearchFrameNor_Client.setBounds((int)(d.width*0.12)+40+20+40+20+40+20,SearchFrameNorHight,40, 30);
	  jl_SearchFrameNor_Client.setFont(font);
	  jl_SearchFrameNor_Client.setCursor(cursor);
	  jp_SearchFrameNorth_nor.add(jl_SearchFrameNor_Client);
	  
	  //设为收藏
	  jl_SearchFrameNor_Collection=new JLabel("设为收藏");
	  jl_SearchFrameNor_Collection.setBounds((int)(d.width*0.8),SearchFrameNorHight,60,30);
	  jl_SearchFrameNor_Collection.setFont(font);
	  jl_SearchFrameNor_Collection.setCursor(cursor);
	  jp_SearchFrameNorth_nor.add(jl_SearchFrameNor_Collection);
	  //分割==4
	  JLabel jl_Divisionfour=new JLabel("|");
	  jl_Divisionfour.setBounds((int)(d.width*0.8)+60,-5,20,40);
	  jp_SearchFrameNorth_nor.add(jl_Divisionfour);
	  //设为首页
	  jl_SearchFrameNor_homePage=new JLabel("设为首页");
	  jl_SearchFrameNor_homePage.setBounds((int)(d.width*0.8)+60+20,SearchFrameNorHight,60,30);
	  jl_SearchFrameNor_homePage.setFont(font);
	  jl_SearchFrameNor_homePage.setCursor(cursor);
	  jp_SearchFrameNorth_nor.add(jl_SearchFrameNor_homePage);
	  //分割==5
	  JLabel jl_Divisionfive=new JLabel("|");
	  jl_Divisionfive.setBounds((int)(d.width*0.8)+60+20+60,-5,20,40);
	  jp_SearchFrameNorth_nor.add(jl_Divisionfive);
	  //帮助
	  jl_SearchFrameNor_helpTwo=new JLabel("帮助");
	  jl_SearchFrameNor_helpTwo.setBounds((int)(d.width*0.8)+60+20+60+20,SearchFrameNorHight,40,30);
	  jl_SearchFrameNor_helpTwo.setFont(font);
	  jl_SearchFrameNor_helpTwo.setCursor(cursor);
	  jp_SearchFrameNorth_nor.add(jl_SearchFrameNor_helpTwo);
	}
	//北部===中间(绝对布局)
	public void SearchFrameNorth_cer(Dimension d) {
		Font font=new Font("微软雅黑", Font.PLAIN, 15);//字体格式
		int SearchFrameCerHight=(int)((d.height*0.25)*0.58);
	  //logn书海
	  ImageIcon  SearchFrameCer_logn=new ImageIcon(SearchFrame.class.getResource("./img/NoticeLogn.png"));
	  jl_SearchFrameCer_logn=new JLabel();
	  jl_SearchFrameCer_logn.setIcon(SearchFrameCer_logn);
	  jl_SearchFrameCer_logn.setBounds((int)(d.width*0.12),(int)(SearchFrameCerHight*0.052),SearchFrameCer_logn.getIconWidth(),
			  SearchFrameCer_logn.getIconHeight());
	  jl_SearchFrameCer_logn.setCursor(cursor);
	  jp_SearchFrameNorth_cer.add(jl_SearchFrameCer_logn);
	  //言情网标签
	  jl_SearchFrameCer_Romance=new JLabel("┠ 言情网");
	  jl_SearchFrameCer_Romance.setBounds((int)(d.width*0.1175)+SearchFrameCer_logn.getIconWidth(),
			  (int)(SearchFrameCerHight*0.14),80, 30); 
	  jl_SearchFrameCer_Romance.setCursor(cursor);
	  jl_SearchFrameCer_Romance.setFont(font);
	  jp_SearchFrameNorth_cer.add(jl_SearchFrameCer_Romance);
	  //文学网标签
	  jl_SearchFrameCer_literature=new JLabel("┠ 文学网");
	  jl_SearchFrameCer_literature.setBounds((int)(d.width*0.1175)+SearchFrameCer_logn.getIconWidth(),
			  (int)(SearchFrameCerHight*0.38),80, 30); 
	  jl_SearchFrameCer_literature.setCursor(cursor);
	  jl_SearchFrameCer_literature.setFont(font);
	  jp_SearchFrameNorth_cer.add(jl_SearchFrameCer_literature);
	  //言情网标签
	  jl_SearchFrameCer_Comic=new JLabel("┠ 动漫网");
	  jl_SearchFrameCer_Comic.setBounds((int)(d.width*0.1175)+SearchFrameCer_logn.getIconWidth(),
			  (int)(SearchFrameCerHight*0.62),80, 30); 
	  jl_SearchFrameCer_Comic.setCursor(cursor);
	  jl_SearchFrameCer_Comic.setFont(font);
	  jp_SearchFrameNorth_cer.add(jl_SearchFrameCer_Comic);
	  //推荐小说标签
	  ImageIcon im_SearchFrameCer_Recommendnovel=new ImageIcon(SearchFrame.class.getResource("./img/推荐小说.jpg"));
	  jl_SearchFrameCer_Recommendnovel=new JLabel();
	  jl_SearchFrameCer_Recommendnovel.setIcon(im_SearchFrameCer_Recommendnovel);
	  jl_SearchFrameCer_Recommendnovel.setBounds((int)(d.width*0.18)+SearchFrameCer_logn.getIconWidth(),
			  (int)(SearchFrameCerHight*0.14),im_SearchFrameCer_Recommendnovel.getIconWidth(),im_SearchFrameCer_Recommendnovel.getIconHeight()); 
	  jl_SearchFrameCer_Recommendnovel.setCursor(cursor);
	  jp_SearchFrameNorth_cer.add(jl_SearchFrameCer_Recommendnovel);
	  //公告展示
	  ImageIcon im_SearchFrameCer_SearchFramedisplay=new ImageIcon(SearchFrame.class.getResource("./img/公告paint.png"));
	  jl_SearchFrameCer_SearchFramedisplay=new JLabel();
	  jl_SearchFrameCer_SearchFramedisplay.setIcon(im_SearchFrameCer_SearchFramedisplay);
	  jl_SearchFrameCer_SearchFramedisplay.setBounds((int)(d.width*0.20 )+SearchFrameCer_logn.getIconWidth()+
			  im_SearchFrameCer_Recommendnovel.getIconWidth(),(int)(SearchFrameCerHight*0.07),
			  im_SearchFrameCer_SearchFramedisplay.getIconWidth(),
			  im_SearchFrameCer_SearchFramedisplay.getIconHeight()); 
	  jl_SearchFrameCer_SearchFramedisplay.setCursor(cursor);
	  jp_SearchFrameNorth_cer.add(jl_SearchFrameCer_SearchFramedisplay);  
	}
	//北部===南面(绝对布局)
	public void SearchFrameNorth_sth(Dimension d) {
    	int SearchFrameSthHight=(int)((d.height*0.28)*0.30);//面板高
    	Font font=new Font("宋体",Font.PLAIN, 16);
    	//菜单面板
    	jp_SearchFrameSth_menu=new JPanel();
    	jp_SearchFrameSth_menu.setBounds(0, 3,d.width,(int)(SearchFrameSthHight*0.55));
    	jp_SearchFrameSth_menu.setLayout(null);
    	jp_SearchFrameNorth_sth.add(jp_SearchFrameSth_menu);
    	//首页
    	jb_SearchFrameSth_homePage=new JButton("首页");
    	jb_SearchFrameSth_homePage.setBounds((int)(d.width*0.12),-2,(int)(d.width*0.07), 40);
    	jb_SearchFrameSth_homePage.setFont(font);
    	jb_SearchFrameSth_homePage.setFocusable(false);
    	jb_SearchFrameSth_homePage.setCursor(cursor);
    	jb_SearchFrameSth_homePage.setBackground(new Color(0,160,178));
    	jp_SearchFrameSth_menu.add(jb_SearchFrameSth_homePage);
    	//女生频道
    	jb_SearchFrameSth_girlChannel=new JButton("女生频道");
    	jb_SearchFrameSth_girlChannel.setBounds((int)(d.width*0.12)+(int)(d.width*0.07),-2,(int)(d.width*0.07), 40);
    	jb_SearchFrameSth_girlChannel.setFont(font);
    	jb_SearchFrameSth_girlChannel.setFocusable(false);
    	jb_SearchFrameSth_girlChannel.setCursor(cursor);
//    	jb_SearchFrameSth_girlChannel.setBackground(new Color(0,160,178));
    	jp_SearchFrameSth_menu.add(jb_SearchFrameSth_girlChannel);
    	//排行榜
    	jb_SearchFrameSth_RankList=new JButton("排行榜");
    	jb_SearchFrameSth_RankList.setBounds((int)(d.width*0.12)+(int)(d.width*0.07)+(int)(d.width*0.07),-2,(int)(d.width*0.07), 40);
    	jb_SearchFrameSth_RankList.setFont(font);
    	jb_SearchFrameSth_RankList.setFocusable(false);
    	jb_SearchFrameSth_RankList.setCursor(cursor);
//    	jb_SearchFrameSth_girlRankList.setBackground(new Color(0,160,178));
    	jp_SearchFrameSth_menu.add(jb_SearchFrameSth_RankList);
    	//搜小说
    	jb_SearchFrameSth_query=new JButton("搜小说");
    	jb_SearchFrameSth_query.setBounds((int)(d.width*0.12)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07),-2,(int)(d.width*0.07), 40);
    	jb_SearchFrameSth_query.setFont(font);
    	jb_SearchFrameSth_query.setFocusable(false);
    	jb_SearchFrameSth_query.setCursor(cursor);
//    	jb_SearchFrameSth_query.setBackground(new Color(0,160,178));
    	jp_SearchFrameSth_menu.add(jb_SearchFrameSth_query);
    	//作者福利
    	jb_SearchFrameSth_authorWelfare=new JButton("作者福利");
    	jb_SearchFrameSth_authorWelfare.setBounds((int)(d.width*0.12)+(int)(d.width*0.07)
    			+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07),-2,
    			(int)(d.width*0.07), 40);
    	jb_SearchFrameSth_authorWelfare.setFont(font);
    	jb_SearchFrameSth_authorWelfare.setFocusable(false);
    	jb_SearchFrameSth_authorWelfare.setCursor(cursor);
//    	jb_SearchFrameSth_authorWelfare.setBackground(new Color(0,160,178));
    	jp_SearchFrameSth_menu.add(jb_SearchFrameSth_authorWelfare);
    	//作者板块
    	jb_SearchFrameSth_authorArea=new JButton("作者福利");
    	jb_SearchFrameSth_authorArea.setBounds((int)(d.width*0.12)+(int)(d.width*0.07)+
    			(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+
    			(int)(d.width*0.07),-2,(int)(d.width*0.07), 40);
    	jb_SearchFrameSth_authorArea.setFont(font);
    	jb_SearchFrameSth_authorArea.setFocusable(false);
    	jb_SearchFrameSth_authorArea.setCursor(cursor);
//    	jb_SearchFrameSth_authorArea.setBackground(new Color(0,160,178));
    	jp_SearchFrameSth_menu.add(jb_SearchFrameSth_authorArea);
    	//资讯
    	jb_SearchFrameSth_SearchFrame=new JButton("资讯");
    	jb_SearchFrameSth_SearchFrame.setBounds((int)(d.width*0.12)+(int)(d.width*0.07)+
    			(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+
    			(int)(d.width*0.07)+(int)(d.width*0.07),-2,(int)(d.width*0.07), 40);
    	jb_SearchFrameSth_SearchFrame.setFont(font);
    	jb_SearchFrameSth_SearchFrame.setFocusable(false);
    	jb_SearchFrameSth_SearchFrame.setCursor(cursor);
//    	jb_SearchFrameSth_SearchFrame.setBackground(new Color(0,160,178));
    	jp_SearchFrameSth_menu.add(jb_SearchFrameSth_SearchFrame);
    	//wap.客户端
    	jb_SearchFrameSth_Client=new JButton("wap.客户端");
    	jb_SearchFrameSth_Client.setBounds((int)(d.width*0.12)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07),-2,(int)(d.width*0.075), 40);
    	jb_SearchFrameSth_Client.setFont(font);
    	jb_SearchFrameSth_Client.setFocusable(false);
    	jb_SearchFrameSth_Client.setCursor(cursor);
//    	jb_SearchFrameSth_Client.setBackground(new Color(0,160,178));
    	jp_SearchFrameSth_menu.add(jb_SearchFrameSth_Client);
    	//充值
    	jb_SearchFrameSth_Recharge=new JButton("充值");
    	jb_SearchFrameSth_Recharge.setBounds((int)(d.width*0.12)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.075),-2,(int)(d.width*0.07), 40);
    	jb_SearchFrameSth_Recharge.setFont(font);    	
    	jb_SearchFrameSth_Recharge.setFocusable(false);
    	jb_SearchFrameSth_Recharge.setCursor(cursor);
//    	jb_SearchFrameSth_Recharge.setBackground(new Color(0,160,178));
    	jb_SearchFrameSth_Recharge.setForeground(Color.RED);
    	jp_SearchFrameSth_menu.add(jb_SearchFrameSth_Recharge);
        //客服
    	jb_SearchFrameSth_CustomerService=new JButton("客服");
    	jb_SearchFrameSth_CustomerService.setBounds((int)(d.width*0.12)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.07)+(int)(d.width*0.075)+(int)(d.width*0.07),-2,(int)(d.width*0.07), 40);
    	jb_SearchFrameSth_CustomerService.setFont(font);
    	jb_SearchFrameSth_CustomerService.setFocusable(false);
    	jb_SearchFrameSth_CustomerService.setCursor(cursor);
//    	jb_SearchFrameSth_CustomerService.setBackground(new Color(0,160,178));
    	jp_SearchFrameSth_menu.add(jb_SearchFrameSth_CustomerService);
    	
    	Font font1=new Font("宋体",Font.PLAIN, 15);
    	//书库
    	jl_SearchFrameSth_StackRoom=new JLabel("书库");
    	jl_SearchFrameSth_StackRoom.setBounds((int)(d.width*0.14), (int)(SearchFrameSthHight*0.55)+3,30, 30);
    	jl_SearchFrameSth_StackRoom.setFont(font1);
    	jl_SearchFrameSth_StackRoom.setForeground(Color.white);
    	jl_SearchFrameSth_StackRoom.setCursor(cursor);
    	jp_SearchFrameNorth_sth.add(jl_SearchFrameSth_StackRoom);
    	//都市-言情
    	jl_SearchFrameSth_urbanAndRomance=new JLabel("都市-言情");
    	jl_SearchFrameSth_urbanAndRomance.setBounds((int)(d.width*0.14)+70, (int)(SearchFrameSthHight*0.55)+3,80, 30);
    	jl_SearchFrameSth_urbanAndRomance.setFont(font1);
    	jl_SearchFrameSth_urbanAndRomance.setForeground(Color.white);
    	jl_SearchFrameSth_urbanAndRomance.setCursor(cursor);
    	jp_SearchFrameNorth_sth.add(jl_SearchFrameSth_urbanAndRomance);
    	//玄幻-修真
    	jl_SearchFrameSth_fantasy=new JLabel("玄幻-修真");
    	jl_SearchFrameSth_fantasy.setBounds((int)(d.width*0.14)+70+100, (int)(SearchFrameSthHight*0.55)+3,80, 30);
    	jl_SearchFrameSth_fantasy.setFont(font1);
    	jl_SearchFrameSth_fantasy.setForeground(Color.white);
    	jl_SearchFrameSth_fantasy.setCursor(cursor);
    	jp_SearchFrameNorth_sth.add(jl_SearchFrameSth_fantasy);
    	//历史-武侠
    	jl_SearchFrameSth_history=new JLabel("历史-武侠");
    	jl_SearchFrameSth_history.setBounds((int)(d.width*0.14)+70+100+100, (int)(SearchFrameSthHight*0.55)+3,80, 30);
    	jl_SearchFrameSth_history.setFont(font1);
    	jl_SearchFrameSth_history.setForeground(Color.white);
    	jl_SearchFrameSth_history.setCursor(cursor);
    	jp_SearchFrameNorth_sth.add(jl_SearchFrameSth_history);
    	//网游-竞技
    	jl_SearchFrameSth_sports=new JLabel("网游-竞技");
    	jl_SearchFrameSth_sports.setBounds((int)(d.width*0.14)+70+100+100+100, (int)(SearchFrameSthHight*0.55)+3,80, 30);
    	jl_SearchFrameSth_sports.setFont(font1);
    	jl_SearchFrameSth_sports.setForeground(Color.white);
    	jl_SearchFrameSth_sports.setCursor(cursor);
    	jp_SearchFrameNorth_sth.add(jl_SearchFrameSth_sports);
    	//军事-科幻
    	jl_SearchFrameSth_military=new JLabel("军事-科幻");
    	jl_SearchFrameSth_military.setBounds((int)(d.width*0.14)+70+100+100+100+100, (int)(SearchFrameSthHight*0.55)+3,80, 30);
    	jl_SearchFrameSth_military.setFont(font1);
    	jl_SearchFrameSth_military.setForeground(Color.white);
    	jl_SearchFrameSth_military.setCursor(cursor);
    	jp_SearchFrameNorth_sth.add(jl_SearchFrameSth_military);
    	//恐怖-同人
    	jl_SearchFrameSth_terror=new JLabel("恐怖-同人");
    	jl_SearchFrameSth_terror.setBounds((int)(d.width*0.14)+70+100+100+100+100+100, (int)(SearchFrameSthHight*0.55)+3,80, 30);
    	jl_SearchFrameSth_terror.setFont(font1);
    	jl_SearchFrameSth_terror.setForeground(Color.white);
    	jl_SearchFrameSth_terror.setCursor(cursor);
    	jp_SearchFrameNorth_sth.add(jl_SearchFrameSth_terror);
    	//全本-新书
    	jl_SearchFrameSth_newBook=new JLabel("全本-新书");
    	jl_SearchFrameSth_newBook.setBounds((int)(d.width*0.14)+70+100+100+100+100+100+100, (int)(SearchFrameSthHight*0.55)+3,80, 30);
    	jl_SearchFrameSth_newBook.setFont(font1);
    	jl_SearchFrameSth_newBook.setForeground(Color.white);
    	jl_SearchFrameSth_newBook.setCursor(cursor);
    	jp_SearchFrameNorth_sth.add(jl_SearchFrameSth_newBook);    	
    }
	
	public static void main(String[] args) {
		new SearchFrame();

	}

}
